package com.neuedu.his.controller;

import com.neuedu.his.po.Disease;
import com.neuedu.his.service.DiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/disease")
public class DiseaseController {

    @Autowired
    private DiseaseService diseaseService;

    @GetMapping("/search")
    public List<Disease> searchDiseases(@RequestParam(required = false) String keyword) {
        return diseaseService.searchDiseases(keyword);
    }
}